package com.hqyj.controller;


import com.hqyj.pojo.Vids;
import com.hqyj.service.IVidsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/**
 * <p>
 * 会员表 前端控制器
 * </p>
 *
 * @author rock
 * @since 2021-10-21
 */
@Controller
@RequestMapping("/vids")
public class VidsController {
    @Autowired
    IVidsService vidsService;
    @RequestMapping("listPage")
    public String listPage(){
        return "/vip/vip";
    }

    @RequestMapping("list")
    @ResponseBody
    public HashMap<String,Object> list(Vids vids){
        return vidsService.queryList(vids);
    }
    @PostMapping("update")
    @ResponseBody
    public HashMap<String,Object> update(@RequestBody  Vids vids){
        return vidsService.update(vids);
    }
    @RequestMapping("add")
    @ResponseBody
    public HashMap<String,Object> add(Vids vids){
        return vidsService.add(vids);
    }
    @RequestMapping("del")
    @ResponseBody
    public HashMap<String,Object> del(Vids vids){
        return vidsService.del(vids);
    }

    @RequestMapping("queryLv")
    @ResponseBody
    public HashMap<String,Object> queryLv(String tel){
        return vidsService.queryLv(tel);
    }

}

